<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    @include('public.h5_head')
    <meta name="csrf_token" id="token" content="{{ csrf_token() }}">
    <title>赊账款清单</title>
    <script src="{{ env('CDN_DOMAIN_NAME') }}/js/commonjs/rem.js"></script>
    <link rel="stylesheet" type="text/css" href="{{ env('CDN_DOMAIN_NAME') }}/css/commoncss/common.css"/>
    <link rel="stylesheet" type="text/css" href="{{ env('CDN_DOMAIN_NAME') }}/css/buyer.css"/>
</head>

    <script src="{{ env('CDN_DOMAIN_NAME') }}/js/commonjs/iscroll.js"></script>
	<script src="{{ env('CDN_DOMAIN_NAME') }}/js/app.js"></script>
	<script src="{{ env('CDN_DOMAIN_NAME') }}/js/commonjs/common.js"></script>
<body>
<div id="box_buyer">
    <div class="wrap">
        <div class="main_buyer">
            @if(count($orders) == 0)
            <div class="main_empty">
                <div class="buyer_empty">
                    <div class="buyer_img">
                        <img src="/img/00016.png" alt="" />
                    </div>
                </div>
                <p class="buyer_wrods">目前没有赊账订单</p>
            </div>
            @else
                @foreach($orders as $k => $v)
            <div class="buyer_product">
                <div class="buyer_title">
                    <div class="buyer_icon">
                        <img src="/img/00004.png" alt="" />
                        <span>{{ $brandName[$v->brand_id] }}</span>
                        <div class="buyer_success">
                            @if($v->son_status == 0)
                                首付尚未支付
                            @else
                                @if($v->is_pay)
                                    已结清
                                @else
                                    未结清
                                @endif
                            @endif
                        </div>
                    </div>
                    <div class="buyer_code"><span>订单编号：</span>{{ $v->son_order_num }}</div>
                </div>
                <div class="buyer_buyer">
                    @if($v->is_owe)
                        <div class="bg_nod"></div>
                    @else

                    @endif
                    <div class="buyer_buyer_l">
                        <img src="{{ env('CDN_DOMAIN_NAME') }}/upload/{{ $v->face }}" alt="" class="buyer_buyer_img" />
                    </div>
                    <div class="buyer_buyer_r">
                        <div class="buyer_buyer_name">
                            <p class="buyer_buyer_tit">{{ $v->title }}</p>
                            <p class="buyer_price">￥<b>{{ sprintf('%.2f', $v->total_price/$v->num) }}</b></p>
                        </div>
                        <p class="buyer_buyer_words">款号:{{ $v->girard }}</p>
                        <div class="buyer_list_color">
                            <p class="buyer_list_hue">颜色:{{ $v->color }}</p>
                            <p class="buyer_list_postage">数量:{{ $v->num }}手</p>
                        </div>
                        <div class="buyer_buyer_b">
                            {{--<p class="buyer_buyer_count">邮费：<span class="postage">N/A</span></p>--}}
                            <p class="buyer_buyer_money">合计:<span>￥{{ sprintf('%.2f',$v->total_price) }}</span></p>
                        </div>
                    </div>
                </div>
                <div class="buyer_pass">
                    <p class="buyer_sum">已支付:￥{{ sprintf('%.2f',$v->paid) }}</p>
                    <p class="buyer_nopay">未支付:<b>￥{{ sprintf('%.2f',$v->price)  }}</b></p>
                </div>
                @if( $v->is_pay || $v->son_status == 0)
                @else
                    <p class="buyer_skip"><a href="/user/wechatBrowser?order_num={{ $v->son_order_num }}" class="skip_name">去支付</a></p>
                @endif
            </div>
                @endforeach
            @endif
            <!--添加-->
        </div>
    </div>
</div>
</body>
<script>
    scroll();
</script>
</html>
